<style type="text/css">
	.weui-badge {
		display: inline-block;
		padding: .15em .4em;
		min-width: 8px;
		border-radius: 18px;
		background-color: #f43530;
		color: #fff;
		line-height: 1.2;
		text-align: center;
		font-size: 12px;
		vertical-align: middle;
	}
</style>

<div class="layout-region header" id="__header">
	<div class="layout-safety header-navbar clearfix">
		<div class="lhx float-left m-r-5x">
			<img class="v-middle" src="/public/home/images/logo-about.jpg" height="60px" />
		</div>
		<ul class="header-nav float-left fs18r clearfix">
			<li id="nav-head-sy">
				<a href="/">首页</a>
			</li>
			<li id="nav-head-xmgz">
				<a href="javascript:;">项目估值</a>
				<div class="subnavs">
					<a href="{:url('@project/create')}" id="nav-sub-cjxm">创建项目</a>
					<a href="{:url('@project/cp')}" id="nav-sub-xmpg">项目评估</a>
					<a href="{:url('@project')}" id="nav-sub-yjrj">一键融资</a>
					<!-- <a href="javascript:;">高级评估</a> -->
				</div>
			</li>
			<li id="nav-head-ctyl">
				<a href="javascript:;">创投优链</a>
				<div class="subnavs">
					<a href="{:url('@projects')}" id="nav-sub-xmhx">项目汇选</a>
					<a href="{:url('@activitys')}" id="nav-sub-lyhd">路演活动</a>
					<a href="{:url('@organizations')}" id="nav-sub-hzjg">合作机构</a>
				</div>
			</li>
			<li id="nav-head-jzfw">
				<a href="javascript:;">价值服务</a>
				<div class="subnavs">
					<a href="{:url('@about')}" id="nav-sub-gyjzl">关于价值链</a>
					<!-- <a href="{:url('@bp/create')}"  id="nav-sub-znbp">智能BP</a> -->
					<a href="{:url('@informations')}" id="nav-sub-cyzx">创业资讯</a>
					<a href="{:url('@member')}#member" id="nav-sub-hyzx">会员中心</a>
				</div>
			</li>
		</ul>

		<?php $member = \think\Session::get('member'); ?>
		<?php if(!$member) { ?>
		<div class="float-right header-toolbar">
			<a class="mobile_login" href="/member/login.html">帐号登录</a>
			<a class="wechat_login" href="{:\\app\\wechat\\lib\\ScanOauth::uri()}">微信登录</a>
			<span style="margin: 0 2px;color: #ebebeb;">|</span>
			<a class="register" href="/member/register.html">注册</a>
		</div>
		<?php }else{ ?>
		<div class="header-info lhx float-right">
			<a href="{:url('@member/chat')}" style="display: inline-block; position: relative;">
				<?php $count = getMsgCount(); ?>
				<?php if(0 != $count){ ?>
					<font class="weui-badge fs12r" style="font-family: Arial;position: absolute;top: 16px;right: -8px;">{$count}</font>
				<?php }?>
				<i class="icon-notification fs24r lhx v-middle" title="我的消息" style="color:#999"></i>
			</a>
			<span class="header-info-menus">
				<img src="{:$member['info']['headimgurl']}" style="cursor: pointer;" />
				<div class="header-info-menu">
					<img src="{:$member['info']['headimgurl']}" />
					<p class="p1">{:$member['info']['nickname']}</p>
					<p class="p2">我的钱包：<font style="color: #D5070B; font-size: 18px;">{:$member['account']}</font></p>
					<div class="clearfix m b-line-t">
						<a href="{:url('@member')}#member" class="hov float-left fs14r">会员中心</a>
						<a href="javascript:;" class="hov float-right fs14r" id="submit-logout">退出登录</a>
					</div>
				</div>
			</span>
		</div>
		<?php } ?>

	</div>
</div>

<script type="text/javascript">
	var _h = (document.documentElement.clientHeight || document.body.clientHeight) / 2,
		_s_jude = true;
	window.onscroll = function() {
		var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
		if(scrollTop > _h && _s_jude) {
			document.getElementById('__header').className = 'layout-region header header-fixed';
			_s_jude = false;
		} else if(scrollTop <= (_h - 80) && !_s_jude) {
			document.getElementById('__header').className = 'layout-region header';
			_s_jude = true;
		}
	}
</script>
